﻿<UserControl
    x:Class="FU.Capstones.IMS.Web.Silverlight.Controls.MaterialOrderSearchControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
    xmlns:Groupbox="clr-namespace:Groupbox;assembly=Groupbox"
    xmlns:Controls="clr-namespace:FU.Capstones.IMS.Web.Silverlight.Controls">    
    <Groupbox:GroupBox>
        <Groupbox:GroupBox.Header>
            <TextBlock Text="Tìm kiếm" Style="{StaticResource TextBlockGroupBoxTitleStyle}"/>
        </Groupbox:GroupBox.Header>

        <Grid Margin="5,2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>                               
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                
            </Grid.RowDefinitions>

            <!--Order code-->
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    Grid.Column="0" Grid.Row="0">
                    <Run Text="Mã hóa đơn" />
            </TextBlock>
            <TextBox
                x:Name="txtOrderCode" 
                Style="{StaticResource TextBoxNormalStyle}"
                Grid.Column="1" Grid.Row="0"
                Text="{Binding Path=MaterialOrderCriteria.OrderCode, Mode=TwoWay}"    
            />
            <!--Người làm hóa đơn-->
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    HorizontalAlignment="Left"
                    TextAlignment="Left"
                    Grid.Column="3" Grid.Row="0">
                    <Run Text="Người tạo" />
            </TextBlock>
            <ComboBox 
                    HorizontalAlignment="Right"
                    x:Name="cbOrderCreater" 
                    Style="{StaticResource ComboBoxNormalStyle}"
                    Grid.Column="4" Grid.Row="0"
                    ItemsSource="{Binding Path=EmployeeCollection, Mode=TwoWay}"
                    DisplayMemberPath="FullName"
                    SelectedItem="{Binding Path=MaterialOrderCriteria.EmployeeA, Mode=TwoWay}"
                    
            />
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
                    <Run Text="Ngày tạo hóa đơn :" />
            </TextBlock>
            <!--Date from-->
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left">
                    <Run Text="Từ :" />
            </TextBlock>
            <telerikInput:RadDatePicker
					    x:Name="txtCreateDateFrom"
					    Grid.Row="2" Grid.Column="1" Width="210"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Left"
                        TextAlignment="Center"
                        Style="{StaticResource TelerikDatePickerNormalStyle}"
				        SelectedDate="{Binding Path=MaterialOrderCriteria.ExportedOrImportedDateFrom, Mode=TwoWay}"
				    />

            <!--Date to-->
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    Grid.Column="3" Grid.Row="2" HorizontalAlignment="Left">
                    <Run Text="Đến :" />
            </TextBlock>
            <telerikInput:RadDatePicker
					    x:Name="txtCreateDateTo"
					    Grid.Row="2" Grid.Column="4" Width="210"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Right"
                        TextAlignment="Center"
                        Style="{StaticResource TelerikDatePickerNormalStyle}"
				        SelectedDate="{Binding Path=MaterialOrderCriteria.ExportedOrImportedDateTo, Mode=TwoWay}"
				    />
            <TextBlock
                    Style="{StaticResource TextBlockNormalStyle}"
                    Grid.Column="0"
                    Grid.Row="3"
                    HorizontalAlignment="Left">
                    <Run Text="Trạng thái"/>
            </TextBlock>
            
            <Grid Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <CheckBox 
                    Name="chbDelete" Content="Đã xóa" 
                    IsChecked="{Binding Path=IsDelete, Mode=TwoWay}"
                    Grid.Row="0" Grid.Column="0"
                    Style="{StaticResource CheckBoxNormalStyle}">                    
                </CheckBox>
                <CheckBox Name="chbUnDelete" Content="Chưa xóa" 
                          Grid.Row="1"
                          Grid.Column="0"
                          IsChecked="{Binding Path=IsUnDelete, Mode=TwoWay}"
                    Style="{StaticResource CheckBoxNormalStyle}">
                </CheckBox>
                <CheckBox Name="chbImport" Content="Nhập kho" 
                          Grid.Row="0"
                          Grid.Column="1"
                          IsChecked="{Binding Path=IsImport, Mode=TwoWay}"
                    Style="{StaticResource CheckBoxNormalStyle}">
                </CheckBox>
                <CheckBox Name="chbExport" Content="Xuất kho" 
                          Grid.Row="1"
                          Grid.Column="1"
                          IsChecked="{Binding Path=IsUnImport, Mode=TwoWay}"
                    Style="{StaticResource CheckBoxNormalStyle}">
                </CheckBox>
                <CheckBox Name="chbNVL" Content="Nguyên liệu" 
                          Grid.Row="0"
                          Grid.Column="2"
                          IsChecked="{Binding Path=IsMaterial, Mode=TwoWay}"
                    Style="{StaticResource CheckBoxNormalStyle}">
                </CheckBox>
                <CheckBox Name="chbProduct" Content="Thành phẩm" 
                          Grid.Row="1"
                          Grid.Column="2"
                          IsChecked="{Binding Path=IsProduct, Mode=TwoWay}"
                    Style="{StaticResource CheckBoxNormalStyle}">
                </CheckBox>


            </Grid>
            <!--btnSearch-->
            <Controls:SearchButtonControl
				Grid.Column="4" Grid.Row="3"
                HorizontalAlignment="Right"/>
        </Grid>
    </Groupbox:GroupBox>
</UserControl>
